//1.因引入vuex
import Vue from "vue";
import Vuex from "vuex";

//引入vuex的模块
import count from "./modules/count";
import movie from "./modules/movie";

//引入持久化存储的差价
import createPersistedState from "vuex-persistedstate";

//2.首先在Vue使用插件Vuex
Vue.use(Vuex);

//3.初始化仓库并暴露
export default new Vuex.Store({
  modules: {
    count,
    movie,
  },
  plugins: [createPersistedState()],
});
